package com.pdf.service.impl;
/*
 *@ClassName: PdfServiceImpl
 *@Description: TODO
 *@author: 郑波
 *@date: 2019-04-13 19:46
 *@version: 1.0
 */

import com.pdf.dataObject.Pdf;
import com.pdf.repository.PdfRepository;
import com.pdf.service.PdfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PdfServiceImpl implements PdfService {
    @Autowired
    private PdfRepository pdfRepository;
    @Override
    public List<Pdf> getByUserUid(String userUid) {
        return pdfRepository.getByUserUid(userUid);

    }

    @Override
    public Pdf getByUserUidAndAndFileName(String userUid, String fileName) {
        return pdfRepository.getByUserUidAndAndFileName(userUid,fileName);
    }

    @Override
    public void update(Pdf pdf) {
        pdfRepository.save(pdf);
    }
}
